
<!DOCTYPE html>


<html xmlns="http://www.w3.org/1999/xhtml" scroll="no">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="shortcut icon" href="/static/favicon.ico" type="image/x-icon" />
<!--Basic Styles-->
<link href="${ctx }framework/css/font.css" rel="stylesheet" />
<link href="${ctx }framework/miniui/themes/material/miniui.css"
	rel="stylesheet" />
<link href="${ctx }framework/css/app.min.1.css" rel="stylesheet"
	type="text/css" />
<link href="${ctx }framework/css/app.min.2.css" rel="stylesheet"
	type="text/css" />
<script src="${ctx }framework/main.js" type="text/javascript"></script>
<script src="${ctx }eao/static/echarts.min.js"></script>
<style type="text/css">
html, body {
	margin: 0;
	padding: 0;
	border: 0;
	width: 100%;
	height: 100%;
	overflow: hidden;
}
</style>
<script>
	function doSearch() {
		var startTime = mini.get("StartTime").getFormValue();
		var endTime = mini.get("EndTime").getFormValue();
		var report_type = mini.get("ProjectType").getFormValue();
		var MCity = mini.get("MCity").getFormValue();
		var MProvince = mini.get("MProvince").getFormValue();
		var CompanyInfo = mini.get("tb").getFormValue()
		/* var obj = mini.get("provice");
        var newMember = obj.getValue(); */
		var dc = {
			MProvince : MProvince,
			MCity : MCity,
			ProjectType : report_type,
			EndTime : endTime,
			StartTime : startTime,
			Account : CompanyInfo
		};
		Server.sendRequest("visit.visit", dc, function(response) {
			if (response._STATUS == 1) {
				mini.get("countId").setValue(response.countId);
				mini.get("SUMvisit").setValue(response.counteq);
				mini.get("counteq").setValue(response.SUMvisit);
			} else {
				top.mini.warn(response._Message);
			}
		});
		/* --------------折线图--------------- */
		var lineCount = [], lineDate = [], lineProjectCount = [];
		Server.sendRequest("visit.publicityVisit",dc,
		function(response) {
                 console.log(response.publicity_time+"---------");
			if (response._STATUS == 1) {
				for (var i = 0; i < response.publicity_time.length; i++) {
					lineCount.push(response.publicity_time[i].count);
					lineDate.push(response.publicity_time[i].date);
					lineProjectCount.push(response.publicity_time[i].VisitNumber);
				}
				//折线图
				var myChart = echarts
						.init(document
								.getElementById("provinceScale"));
				var option = {
					tooltip : {
						trigger : 'axis',
						axisPointer : {
							type : 'cross',
							label : {
								backgroundColor : '#6a7985'
							}
						}
					},
					legend : {
						data : [ '公示每日数量',
								'每日访问量' ]
					},
					toolbox : {
						feature : {
							saveAsImage : {}
						}
					},
					grid : {
						left : '3%',
						right : '4%',
						bottom : '3%',
						containLabel : true
					},
					xAxis : [ {
						type : 'category',
						boundaryGap : false,
						data : lineDate
					} ],
					yAxis : [ {
						ype : 'value'
					} ],
					series : [ {
						name : '公示每日数量',
						type : 'line',
						stack : '总量',
						data : lineCount
					}, {
						name : '每日访问量',
						type : 'line',
						stack : '总量',
						data : lineProjectCount
					} ]
				};
				myChart.setOption(option);
				/* top.mini.showTips({content:response.Message,state:'success'}); */
			} else {
				top.mini.warn(response.Message);
			}
		});
	}
	$(function() {
		doSearch();//触发doSearch（）方法
	});
	document.onkeydown = function(event) {
		event = getEvent(event);
		if (event.keyCode == 13) {
			var ele = event.srcElement || event.target;
			if (ele.id == 'SearchName' || ele.id == 'Submitbutton') {
				doSearch();
			}
		}
	};

	var newQueryString = null;

	function onRowSelect(e) {
		newQueryString = "ID=" + e.row.ID;
		mini.get('mainTabs').tryReload(newQueryString);
	}

	function onTabsActiveChanged(e) {
		e.sender.tryReload(newQueryString, e.sender.getTab(e.index));
	}

	Page.onLoad(function() {
	});
	 function onCloseClick(e) {
         var obj = e.sender;
         obj.setText("");
         obj.setValue("");
     }
	 function company(){
			mini.open({
				width:800,
				height:600,
				title:'请选择一级机构账号',
				url:'${ctx}eao/dataanalyze/companyInfoList.jhtml',
				onOk : function(){
					var form = $DW.mini.getForm('form2');
					var dc = form.getData();
					var obj = mini.get("tb");
			         	obj.setValue(dc.CompanyMobile);
					if(dc.notCompany=="true"){
						obj.setValue("非体系内账号");
					}
			        $D.close();
					}
			});
		}
	 function clearText(){
			var obj = mini.get("tb");
	        obj.setValue("");
		}
</script>
</head>
<body class="body-list" style="background: #F9F9F9;">
	<ef:init method="visit.visit"></ef:init>
	<div id="layout1" class="mini-layout" style="width: 100%; height: 100%;">
		<div title="north" region="north" showheader="false">
       		<div class="mini-toolbar">
				<div class="pull-left">
					<span style=""> 从<input class="mini-datepicker"
						maxDate="Script=new Date()" id="StartTime" name="StartDate"
						valueType="string" allowinput="false" format="yyyy-MM-dd" />&nbsp;
						至<input class="mini-datepicker" maxDate="Script=new Date()"
						id="EndTime" name="EndDate" valueType="string" allowinput="false"
						format="yyyy-MM-dd" />
					</span>
					<input id="ProjectType" class="mini-combobox" style="width:150px;" textField="text" emptyText='请选择项目类型' valueField="id" showClose="true" oncloseclick="onCloseClick" data="[
						{id:'0',text:'一次公示'},
						{id:'1',text:'二次公示'},
						{id:'2',text:'验收公示'},
						{id:'3',text:'全体公示'},
						{id:'4',text:'其他公示'},
					]"/>
					<input class="mini-textbox" id="MProvince" type="text" emptyText="请输入省份" />
					<input class="mini-textbox" id="MCity"type="text" emptyText="请输入城市" />
					<!-- <input class="mini-combobox" size="30" showClose="true" oncloseclick="onCloseClick"  emptyText='请选择机构名称' multiSelect="false"  id="provice"  name="Type" /> -->
					<input id="tb" class="mini-textbox" emptyText="请选择选择账号" readonly="readonly"/>
					<input type="button" value="清空" onclick="clearText()"/>
					<a class="mini-button" iconCls="icon-user" href="javascript:company();">选择一级机构账号</a>
					<button
						class="btn btn-default waves-effect waves-button waves-float"
						onClick="doSearch()">
						<i class="iconfont icon-search"></i>
					</button>
				</div>
			</div>
    	</div>
		<div region="west" width="900" showheader="false">
			<div class="mini-fit">
				<div id="dg2" class="col-xs-6"
					style="margin-left: 2%; width: 600px; margin-top: 20px">
					<div class="" style="padding-left: 20px; height: 420px;">
						<p style="margin-top: 10px;">
							<span style="font-size: 20px;">公示统计</span>
						</p>
						<div class="input-group" style="margin-left: 20px;">
							<span class="input-group-addon"><label for="Code$text">累计公示数量:</label></span>
							<input class="mini-textbox" value="${countId}" width="300"
								required="true" id="countId" size="30" />
						</div>
						<div class="input-group" style="margin-left: 20px;">
							<span class="input-group-addon"><label for="Name$text">归档报告数量:</label></span>
							<input class="mini-textbox" value="${counteq}" width="300"
								required="true" id="SUMvisit" size="30" />
						</div>

						<div class="input-group" style="margin-left: 20px;">
							<span class="input-group-addon"><label for="Name$text">累计访问量:</label></span>
							<input class="mini-textbox" value="${SUMvisit}" width="300"
								required="true" id="counteq" size="30" />
						</div>
					</div>
				</div>
			</div>
		</div>
		<div region="center">
			<div id="mainTabs" class="mini-tabs"
				style="width: 100%; height: 100%;" plain="false"
				onbeforeactivechanged="onTabsActiveChanged">
				<div title="折线图" iconCls="icon-database">
					<div class="echarts" id="provinceScale"
						style="height: 500px; width: 500px; margin: 0 auto;"></div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>

<!-- Generated by Wisc cost:10ms ip:123.14.77.14 -->